import { S } from '../../s';
import { IPSAppDEUIActionGroupDetail } from '../../app/dataentity/ipsapp-deuiaction-group-detail';
import { IPSDEUIActionGroupDetail } from './ipsdeuiaction-group-detail';
import { IPSLanguageRes } from '../../res/ipslanguage-res';
import { IPSSysCss } from '../../res/ipssys-css';
import { IPSSysImage } from '../../res/ipssys-image';
import { IPSUIAction } from '../../view/ipsuiaction';
import { PSModelObjectImpl } from '../../psmodel-object-impl';

export class PSDEUIActionGroupDetailImpl
  extends PSModelObjectImpl
  implements IPSDEUIActionGroupDetail, IPSAppDEUIActionGroupDetail
{
  get actionLevel(): 50 | 100 | 200 | 250 {
    return this.M.actionLevel != null ? this.M.actionLevel : 100;
  }

  get afterContent(): string {
    return this.M.afterContent;
  }

  get afterItemType(): 'NONE' | 'RAW' {
    return this.M.afterItemType || 'NONE';
  }

  protected afterpslanguageres: IPSLanguageRes;
  getAfterPSLanguageRes(): IPSLanguageRes | null {
    return (
      this.afterpslanguageres ||
      (this.afterpslanguageres = this.fillObjectModel(
        S._276,
        this.M.getAfterPSLanguageRes,
        S._3e3,
      ) as IPSLanguageRes)
    );
  }

  protected afterpssyscss: IPSSysCss;
  getAfterPSSysCss(): IPSSysCss | null {
    return (
      this.afterpssyscss ||
      (this.afterpssyscss = this.fillObjectModel(
        S._278,
        this.M.getAfterPSSysCss,
        S._3e4,
      ) as IPSSysCss)
    );
  }

  get beforeContent(): string {
    return this.M.beforeContent;
  }

  get beforeItemType(): 'NONE' | 'RAW' {
    return this.M.beforeItemType || 'NONE';
  }

  protected beforepslanguageres: IPSLanguageRes;
  getBeforePSLanguageRes(): IPSLanguageRes | null {
    return (
      this.beforepslanguageres ||
      (this.beforepslanguageres = this.fillObjectModel(
        S._276,
        this.M.getBeforePSLanguageRes,
        S._3e5,
      ) as IPSLanguageRes)
    );
  }

  protected beforepssyscss: IPSSysCss;
  getBeforePSSysCss(): IPSSysCss | null {
    return (
      this.beforepssyscss ||
      (this.beforepssyscss = this.fillObjectModel(
        S._278,
        this.M.getBeforePSSysCss,
        S._3e6,
      ) as IPSSysCss)
    );
  }

  protected cappslanguageres: IPSLanguageRes;
  getCapPSLanguageRes(): IPSLanguageRes | null {
    return (
      this.cappslanguageres ||
      (this.cappslanguageres = this.fillObjectModel(
        S._276,
        this.M.getCapPSLanguageRes,
        S._2a8,
      ) as IPSLanguageRes)
    );
  }

  get caption(): string {
    return this.M.caption;
  }

  get codeName(): string {
    return this.M.codeName;
  }

  get detailTag(): string {
    return this.M.detailTag;
  }

  get detailTag2(): string {
    return this.M.detailTag2;
  }

  get detailType(): 'DEUIACTION' {
    return this.M.detailType;
  }

  protected pssyscss: IPSSysCss;
  getPSSysCss(): IPSSysCss | null {
    return (
      this.pssyscss ||
      (this.pssyscss = this.fillObjectModel(
        S._278,
        this.M.getPSSysCss,
        S._2ac,
      ) as IPSSysCss)
    );
  }

  protected pssysimage: IPSSysImage;
  getPSSysImage(): IPSSysImage | null {
    return (
      this.pssysimage ||
      (this.pssysimage = this.fillObjectModel(
        S._27b,
        this.M.getPSSysImage,
        S._2ad,
      ) as IPSSysImage)
    );
  }

  protected psuiaction: IPSUIAction;
  getPSUIAction(): IPSUIAction | null {
    return (
      this.psuiaction ||
      (this.psuiaction = this.fillObjectModel(
        S._29d,
        this.M.getPSUIAction,
        S._2de,
      ) as IPSUIAction)
    );
  }

  get tooltip(): string {
    return this.M.tooltip;
  }

  protected tooltippslanguageres: IPSLanguageRes;
  getTooltipPSLanguageRes(): IPSLanguageRes | null {
    return (
      this.tooltippslanguageres ||
      (this.tooltippslanguageres = this.fillObjectModel(
        S._276,
        this.M.getTooltipPSLanguageRes,
        S._2c5,
      ) as IPSLanguageRes)
    );
  }

  get uIActionParamJO(): IModel {
    return this.M.uIActionParamJO;
  }

  get addSeparator(): boolean {
    return this.M.addSeparator;
  }

  get showCaption(): boolean {
    return this.M.showCaption;
  }

  get showIcon(): boolean {
    return this.M.showIcon;
  }
  get cls(): string {
    return 'PSDEUIActionGroupDetailImpl';
  }
  instanceof(cls: string): boolean {
    if (cls == S._20b || cls == S._20c || cls == S._20d) return true;
    return super.instanceof(cls);
  }
}
